<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body class="body_cls">
        <ui:composition template="/resources/templates/master_template.xhtml">

            <ui:define name="title">
                SysADS - Sistema Gestion Servicios Academicos en Linea
            </ui:define>
            
            <ui:define name="content">
                <hr />
                <div id="news" class="newsbar">News</div>
                <hr />
                <div id="ig-la" style="height: 270px;" >
                    <div id="ig" style="width:60%; float:left;">
                        <p:galleria effect="slide" effectDuration="1000" panelHeight="247" panelWidth="545" showOverlays="true">
                            <p:graphicImage value="/resources/images/g1.jpg" panelWidth="80" title="image1" alt="image1 desc" />
                            <p:graphicImage value="/resources/images/g2.jpg" panelWidth="80" title="image1" alt=" image2 desc" />
                            <p:graphicImage value="/resources/images/g3.jpg" panelWidth="80" title="image1" alt=" image3 desc" />
                            <p:graphicImage value="/resources/images/g4.jpg" panelWidth="80" title="image1" alt=" image4 desc" />
                        </p:galleria>
                    </div>
                    <div id="la" class="login_area" style="width:40%; float:right;">
                        <h:form>
                            <p:panel  id="lgn-panel" header="Login" >
                                <p:growl id="la_growl" life="3500" showDetail="true" />
                                <h:panelGrid columns="1" bgcolor="transparent" width="100%">
                                    <h:outputLabel for="usuario" value="Usuario:    *"  />
                                    <p:inputText id="usuario"  required="true" label="Usuario" size="25" value="#{loginController.login}" >
                                        <f:validateLength minimum="2"  />
                                    </p:inputText>

                                    <h:outputLabel for="contraseña" value="Contraseña: *" />
                                    <p:password id="contraseña" required="true" label="Contraseña" size="25" value="#{loginController.pass}"/>
                                    
                                    <p:selectOneRadio id="rol" label="Rol" required="true" value="#{loginController.rol}">  
                                        <f:selectItem itemLabel="Estudiante" itemValue="estudiante" />  
                                        <f:selectItem itemLabel="Docente" itemValue="docente" />
                                    </p:selectOneRadio>
                                    <f:facet name="footer">
                                        <p:commandButton value="Aceptar" action="#{loginController.doLogin}" update="la_growl" />
                                    </f:facet>
                                    <br />
                                </h:panelGrid>
                            </p:panel>
                        </h:form>
                        <br />
                        <h:form>
                            <h:outputLink id="olv_contraseña" value="javascript:void(0)" onclick="oc_dlg.show();" >
                                <h:outputText value="Olvide Contraseña" />
                            </h:outputLink>
                            &nbsp;&nbsp;
                            <h:outputLink id="do_reg" value="estudiante/registro_estudiantes.jsf">
                                <h:outputText value="Registrarse" />
                            </h:outputLink>
                            &nbsp;&nbsp;
                            <h:outputLink id="intr" value="javascript:void(0)" onclick="oc_dlg.show();">
                                <h:outputText value="Intranet" />
                            </h:outputLink>

                            <p:dialog id="oc_dlg" header="Login - Recuperar Acceso" widgetVar="oc_dlg" showEffect="clip" hideEffect="clip" modal="true">
                                <h:form>  
                                    <h:panelGrid columns="2" style="margin-bottom:10px">  
                                        <h:outputLabel for="nombreusuario" value="Nombre Usuario:" />  
                                        <p:inputText id="nombreusuario" />  
                                    </h:panelGrid>  

                                    <p:commandButton id="submitButton" value="Submit" oncomplete="dlg.hide();"/>  

                                </h:form>
                            </p:dialog>
                            <br />
                            <br />
                            <br />
                        </h:form>
                    </div>
                </div>
                <div id="vc_section">
                    <br /><br />
                    <p:tabView effect="fade" orientation="bottom">
                        <p:tab title="Normas/Valores">
                            <center>
                                <p:graphicImage value="/resources/images/normas-valores.png" />
                            </center>
                        </p:tab>
                        <p:tab title="Cursos/Carreras">

                        </p:tab>
                    </p:tabView>
                </div>
            </ui:define>
        </ui:composition>
    </body>
</html>
